package com.dlc.shop.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.dlc.shop.bean.app.dto.MyOrderDto;
import com.dlc.shop.bean.model.Order;
import com.dlc.shop.bean.model.OrderVirtualInfo;

/**
 * 订单虚拟商品信息
 *
 * @author lhd
 * @date 2021-09-15 15:45:35
 */
public interface OrderVirtualInfoService extends IService<OrderVirtualInfo> {

    /**
     * 获取最新的券码
     *
     * @param shopId 商家id
     * @return 券码
     */
    String getNewCodeInfo(Long shopId);

    /**
     * 通过核销码获取订单信息
     * @param shopId 店铺id
     * @param code 核销码
     * @return 订单信息
     */
    MyOrderDto getOrderByCode(Long shopId, String code);

    /**
     * 用户卡券订单核销操作
     * @param myOrderDto 订单核销信息
     * @param order 订单信息
     * @param stationId 门店id
     * @return 是否核销成功
     */
    Boolean orderWriteOffByOrderNumber(MyOrderDto myOrderDto, Order order, Long stationId);
}
